package com.probiz.estore.common.model.content;

import com.probiz.estore.common.model.content.base.AdvertisementTbl;

public class Advertisement extends AdvertisementTbl {
	
	public static final int STATE_INVALID = 0; //非激活
    public final static Short STATUS_PUBLISHED = 1; //发布中
    public final static Short STATUS_WAITING_FOR_PUBLISH = 2; //等待发布
    public final static Short STATUS_INACTIVE = 0; //退出发布
	    
	public static final Short AD_STATUS_ACTIVE=new Short("1");	
	public static final Short AD_STATUS_CANCEL=new Short("2");
	
	protected int startHour;
	protected int endHour;
  	/**
	 * Default Empty Constructor for class Advertisement
	 */
	public Advertisement () {
		super();
	}
	
	/**
	 * Default Key Fields Constructor for class Advertisement
	 */
	public Advertisement (
		 Integer in_advertisementId
		) {
		super (
		  in_advertisementId
		);
	}
	
	public void setStartHour(int startHour) {
		this.startHour = startHour;
	}

	

	public void setEndHour(int endHour) {
		this.endHour = endHour;
	}

	public int getStartHour() {
		return startHour;
	}

	public int getEndHour() {
		return endHour;
	}
	
	
	public int getStartHourShow() {
		if(null != this.getStartPublishTime()){
			return this.getStartPublishTime().getHours();
		}else{
			return 0;
		}
	}
	
	public int getEndHourShow() {
		if(null != this.getEndPublishTime()){
			return this.getEndPublishTime().getHours();
		}else{
			return 0;
		}
	}

}
